import request from '@/utils/request'

// 查询餐馆分类列表
export function listRescategory(query) {
  return request({
    url: '/system/rescategory/list',
    method: 'get',
    params: query
  })
}

// 查询餐馆分类详细
export function getRescategory(categoryId) {
  return request({
    url: '/system/rescategory/' + categoryId,
    method: 'get'
  })
}

// 新增餐馆分类
export function addRescategory(data) {
  return request({
    url: '/system/rescategory',
    method: 'post',
    data: data
  })
}

// 修改餐馆分类
export function updateRescategory(data) {
  return request({
    url: '/system/rescategory',
    method: 'put',
    data: data
  })
}

// 删除餐馆分类
export function delRescategory(categoryId) {
  return request({
    url: '/system/rescategory/' + categoryId,
    method: 'delete'
  })
}
